#ifndef LIGHT_H
#define LIGHT_H

#include "Model.h"

namespace Model
{
    
/**
 * Represents a light.
 * This class represents a single point light, defined
 * by its x and y coordinates. Lights are always placed 
 * at the ceiling.
 */
class Light
{
    friend class boost::serialization::access;
    
public:
    /**
     * Constructs a light at coordinates (0,0)
     */
    Light();
    
    /**
     * Constructs a light at coordinates (x,y)
     * \param x X coordinate
     * \param y Y coordinates
     */
    Light(double x, double y);
    
    double x(); ///< The X coordinate
    double y(); ///< The Y coordinate
    
    /**
     * Sets the position of the light to the
     * coordinates (x,y)
     * \param x X coordinate
     * \param y Y coordinate
     */
    void setPos(double x, double y);
    
private:
    template<class Archive> 
    void serialize(Archive &ar, const unsigned int version)
    {
        ar & NVP(_x) & NVP(_y);
    }
    
    double _x;
    double _y;
};

}

#endif // LIGHT_H
